package com.dibang.app.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.View;

import com.dibang.app.R;
import com.dibang.app.mvp.base.BaseActivity;
import com.dibang.app.mvp.util.ViewUtil;
import com.dibang.app.operation.control.abs.ByBusLocationControl;
import com.dibang.app.operation.control.impl.ByBusLocationControlImpl;

/**
 * Created by wxl on 2019/8/5.
 *
 */

public class SelectByBusLocationActivity extends BaseActivity<ByBusLocationControl,ByBusLocationControlImpl> {


    @Override
    protected int onCreateBindViewLayoutId(@Nullable Bundle savedInstanceState) {
        return R.layout.activity_select_location_layout;
    }

    @Override
    protected View onCreateBindViewUpdate(int layoutId, @Nullable Bundle savedInstanceState) {
        return ViewUtil.generateActivityViewContainerTitleView(this,layoutId,R.color.translucent_color);
    }

    @Override
    protected void onCreateBindViewChanged(@Nullable Bundle savedInstanceState) {
        String where = getIntent().getStringExtra("where");
        if(!TextUtils.isEmpty(where)){
            control.notifyBusWhereChanged(where);
        }
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        control.onActivityResult(requestCode, resultCode, data);
    }
}
